package com.gzq.factorymethod.pactice2.simple;

import java.lang.reflect.InvocationTargetException;

import com.gzq.factorymethod.practice2.IPeople;

public class DaoFactory {

	public static <T extends IPeople> T createPeople(Class<T> c)
			throws InstantiationException, IllegalAccessException,
			IllegalArgumentException, InvocationTargetException,
			NoSuchMethodException, SecurityException {
		T newInstance = c.getDeclaredConstructor().newInstance();
		return newInstance;
	}

}
